// eslint-disable-next-line no-unused-vars
const obj_type = {
    "roomId": "d4bfce2ec614470c971c",
    "star": 10,
    "roomStatus": 1,
    "isDelete": 0,
    "roomAddress": {
        "roomId": "d4bfce2ec614470c971c",
        "province": "广东省",
        "city": "湛江市",
        "district": "赤坎区",
        "detail": "沙墩村学智路2号",
        "longitude": "110.33489",
        "latitude": "21.283326",
        "isDelete": 0
    },
    "roomDevices": [
        {
            "roomDevId": "2",
            "roomId": "d4bfce2ec614470c971c",
            "devId": "100007732409",
            "isDelete": 0
        },
        {
            "roomDevId": "6",
            "roomId": "d4bfce2ec614470c971c",
            "devId": "100008184246",
            "isDelete": 0
        }
    ],
    "roomImages": {
        "roomUrl": "https://images.unsplash.com/photo-1556912167-f556f1f39fdf?q=80&w=1000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8a2l0Y2hlbiUyMGJhY2tncm91bmR8ZW58MHx8MHx8fDA%3D",
        "roomId": "d4bfce2ec614470c971c",
        "isDelete": 0
    }
}

// 对上述格式返回的数据，提前需要的属性：[店名, 详细地址, 经纬度]
// eslint-disable-next-line no-unused-vars
function extractProperties(obj) {
    const obj_address = obj["roomAddress"]
    let address = `${obj_address["province"]} ${obj_address["city"]} ${obj_address["district"]} ` +
        `${obj_address["detail"]}`
    let longitude = obj_address["longitude"]
    let latitude = obj_address["latitude"]

    return {
        address, // 地址全名
        longitude, // 经度
        latitude // 纬度
    };
}

// 所有数据